﻿#include <qg/qg.h>

kbool _sev_mousemove(qgSevMouseMove& e)
{
	k_mesgf("%d:%d\n", e.x, e.y);
	return true;
}

int main(void)
{
	k_mesgf("STUB WITH PAD TEST\n");

	qgStub* stub = qgStub::New(640, 480, "STUB", 0);

	if (stub)
	{
		stub->AddMouseMoveHandler(&_sev_mousemove);
		stub->SetControllerEnable(true);

		while (stub->Run())
		{
			qgUimControllerInput pi;
			stub->GetControllerInput(0, &pi);

			if (pi.btn&(QICM_A | QICM_B))
				k_printf("BUTTON!!! [%d] [%.3f:%.3f]\n", pi.btn, pi.lthb.x, pi.lthb.y);

			k_sleep(1);
		}

		stub->Unload();
	}

	return 0;
}
